package com.ruoyi.mapper;

import com.ruoyi.domain.ParkingOrder;
import com.ruoyi.dto.dahua.DaHuaIncomeDetailsDto;
import com.ruoyi.vo.dahua.DaHuaIncomeDetailsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 停车订单Mapper接口
 * 
 * @author dongdong
 * @date 2025-08-21
 */
public interface ParkingOrderMapper 
{
    /**
     * 查询停车订单
     *
     * @param id 停车订单主键
     * @return 停车订单
     */
    public ParkingOrder selectParkingOrderById(Long id);

    /**
     * 查询停车订单列表
     *
     * @param parkingOrder 停车订单
     * @return 停车订单集合
     */
    public List<ParkingOrder> selectParkingOrderList(ParkingOrder parkingOrder);

    ParkingOrder selectParkingOrder(ParkingOrder parkingOrder);

    ParkingOrder selectParkingOrderByOrderNo(String orderNo);

    List<ParkingOrder> selectParkingOrderListByUniqueId(@Param("uniqueId") String uniqueId);

    /**
     * 新增停车订单
     *
     * @param parkingOrder 停车订单
     * @return 结果
     */
    public int insertParkingOrder(ParkingOrder parkingOrder);

    /**
     * 修改停车订单
     *
     * @param parkingOrder 停车订单
     * @return 结果
     */
    public int updateParkingOrder(ParkingOrder parkingOrder);

    /**
     * 删除停车订单
     *
     * @param id 停车订单主键
     * @return 结果
     */
    public int deleteParkingOrderById(Long id);

    /**
     * 批量删除停车订单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteParkingOrderByIds(Long[] ids);

    int updateOrderStatusById(@Param("orderStatus") Integer orderStatus, @Param("id")  Long id);

    int updateOrderStatusByOrderNo(@Param("orderStatus") Integer orderStatus, @Param("orderNo") String orderNo);

    List<DaHuaIncomeDetailsVo> selectIncomeDetails(DaHuaIncomeDetailsDto daHuaIncomeDetailsDto);

    List<Map<String, Object>> selectIncomeOverview(@Param("parkId") Long parkId, @Param("yesterday") String yesterday);

    int updateInvoiceByOrderNo(ParkingOrder parkingOrder);
}
